    VB.NET 2005дʱػ           ҳ  ѧԺ       缼  ͼͼ  ϵͳ  ָ    칫  ý嶯  վӪ  ֤  ҳ    web    Ϸ  QQ      ǰλã   򿪷  VB  VB.NET 2005дʱػ     VB.NET 2005дʱػ ڣ2007918 ߣ 鿴:[     С ]       End Function 

<DllImport("advapi32.dll", ExactSpelling:=True, SetLastError:=True)> _ 
Friend Shared Function AdjustTokenPrivileges(ByVal htok As IntPtr, ByVal disall As Boolean, ByRef newst As TokPriv1Luid, ByVal len As Integer, ByVal prev As IntPtr, ByVal relen As IntPtr) As Boolean 
End Function 

<DllImport("user32.dll", ExactSpelling:=True, SetLastError:=True)> _ 
Friend Shared Function ExitWindowsEx(ByVal flg As Integer, ByVal rea As Integer) As Boolean 
End Function 

Friend Const SE_PRIVILEGE_ENABLED As Integer = &amp;H2 
Friend Const TOKEN_QUERY As Integer = &amp;H8 
Friend Const TOKEN_ADJUST_PRIVILEGES As Integer = &amp;H20 
Friend Const SE_SHUTDOWN_NAME As String = "SeShutdownPrivilege" 
Friend Const EWX_LOGOFF As Integer = &amp;H0 'ע 
Friend Const EWX_SHUTDOWN As Integer = &amp;H1'رռ 
Friend Const EWX_REBOOT As Integer = &amp;H2' 
Friend Const EWX_FORCE As Integer = &amp;H4'رн̣ע 
Friend Const EWX_POWEROFF As Integer = &amp;H8 
Friend Const EWX_FORCEIFHUNG As Integer = &amp;H10 

<StrUCtLayout(LayoutKind.Sequential, Pack:=1)> _ 
 'ò 
Friend Structure TokPriv1Luid 
Public Count As Integer 
Public Luid As Long 
Public Attr As Integer 
End Structure 

Private Shared Sub DoExitWin(ByVal flg As Integer) 
Dim xc As Boolean 'ж 
Dim tp As TokPriv1Luid 
Dim hproc As IntPtr = GetCurrentProcess() 
'ýֵ 
Dim htok As IntPtr = IntPtr.Zero 
xc = OpenProcessToken(hproc, TOKEN_ADJUST_PRIVILEGES Or TOKEN_QUERY, htok) 
tp.Count = 1 
tp.Luid = 0 
tp.Attr = SE_PRIVILEGE_ENABLED 
xc = LookupPrivilegeValue(Nothing, SE_SHUTDOWN_NAME, tp.Luid) 
xc = AdjustTokenPrivileges(htok, False, tp, 0, IntPtr.Zero, IntPtr.Zero) 
xc = ExitWindowsEx(flg, 0) 
 һҳ   [1]   [2]   [3]   [4]   һҳ      Ʊҳַͱ⣬͸QQ/Msnĺһ 
 
   VB.NET 2005дʱػ £   VB.NET 2005дʱػ  VB.NET 2005дʱػ   
һƪ: ɱ2008԰  
һƪ: SOAеļܹʦɫ  رվرֹתصר¿תأעԭʼ  .°Ȩԭʼ.ڱվתµĸ˺վǱʾл⡣վת  صаȨϵ༭Ա,ǾԸ. תעԴhttp://www.hackhome.com     ƷƼ  
 ȵTOP10    VB+Accessͼϵͳ    VBʱͱܵ    ؼС洰С仯仯    VBʹDirectXļ̳    VBѧ±ܼӴ    VBݿԴ60ʵ    VBʹEXCEL    180VBͼνԴʵ    VB쳬Ի˵    API޸עģ    ͨſؼMSCommʹ    WINDOWSϢ˵    16תʮ, 16תɶƵ    vsprintӡʵ    webbrowser 2ղأ    VB6DataGridʵͨõӱ    FindWindow    VB6.0ͼ    VB֮·ý    VB̳ ڶ£ؼѧϰ     رƼ    ǳVB.Net Windows Form    ׹Ʊ˰ʼ    VisualBasic 6еĺִ    Զȡû½ƣٽ֤    APIָĿ¼ļ    VBݿԴ60ʵ    VBIEԶ尴ť    VBMS OfficeCOM    Visual Basicװ    WebComputingADOܽᱨ    vsprintӡʵ    VBʵһ򵥵ESMTPͻ    webbrowser 2ղأ    SetForegroundWindow    API޸עģ    VB쳬Ի˵    WINDOWSϢ˵    ؼС洰С仯仯    VBʱͱܵ         | () | Ȩ |  | Ϣ   Copyright 2003-2007  All Rights Reserved.  ICP05018371       